package com.ml.mall.mapper;

import com.ml.mall.bean.req.admin.variant.VariantQueryPageReq;
import com.ml.mall.bean.res.admin.AdminIndustryQueryRes;
import com.ml.mall.bean.res.admin.AdminIndustrySupplierQueryRes;
import com.ml.mall.bean.res.admin.PurchaseByNameSpentRes;
import com.ml.mall.bean.res.admin.PurchaseReportPageRes;
import com.ml.mall.bean.res.admin.category.AdminCategoryQueryPageRes;
import com.ml.mall.bean.res.admin.category.AdminCategoryQueryReportPageRes;
import com.ml.mall.bean.res.admin.category.CategoryQuerySubcategoryTotalfeeRes;
import com.ml.mall.bean.res.admin.supplier.SupplierQueryOneByCategoryRes;
import com.ml.mall.bean.res.admin.supplier.SupplierQueryOneByPurchaseRes;
import com.ml.mall.bean.res.admin.supplier.SupplierQueryPageRes;
import com.ml.mall.bean.res.admin.supplier.vo.SupplierQueryOneVO;
import com.ml.mall.bean.res.admin.variant.VariantQueryPageRes;
import com.ml.mall.bean.res.admin.variant.VariantQueryTopRes;
import com.ml.mall.bean.res.admin.variant.vo.VariantQueryOneVO;
import com.ml.mall.bean.res.admin.variant.vo.VariantQueryTopVO;
import com.ml.mall.bean.res.admin.vo.AdminOverviewSalesByCategoryVO;
import com.ml.mall.bean.res.admin.vo.AdminOverviewSalesByCountryVO;
import com.ml.mall.bean.res.admin.vo.AdminOverviewSalesByIndustryVO;
import com.ml.mall.bean.res.partner.PartnerSupplierQueryPageRes;
import com.ml.mall.bean.vo.DateValueVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;
import java.util.List;

/**
 * Created by kyyang on 2021/6/8 23:01
 */
@Repository
public interface AnalyticsPartnerMapper {


    /**
     * @description: 查询合作商下 时间范围内 供应商销售额
     * @author kyyang
     * @date 2021/6/30 22:30
     * @version 1.0
     */
    BigDecimal selectPartnersRegisterCompanySales(@Param("startTime") String timeBegin,@Param("endTime") String timeEnd,@Param("companyId") Long companyId);

    /**
     * @description: 查询合作商下 时间范围内 供应商注册数量
     * @author kyyang
     * @date 2021/6/30 22:41
     * @version 1.0
     */
    List<DateValueVO> selectPartnersRegisterCompanyListRegister(@Param("startTime") String timeBegin,@Param("endTime") String timeEnd,@Param("companyId") Long companyId);

    /**
     * @description: 查询供货商卖家每日销售
     * @author kyyang
     * @date 2021/6/30 23:00
     * @version 1.0
     */
    List<DateValueVO> selectPartnerSupplierQueryReport(@Param("startTime") String timeBegin,@Param("endTime") String timeEnd,@Param("companyId") Long companyId);

    /**
     * @description: 分页查询合作商下所有卖家 销售额 记录总数
     * @author kyyang
     * @date 2021/7/1 22:00
     * @version 1.0
     */
    Integer selectPartnerSupplierQueryPageCount(@Param("startTime") String timeBegin,@Param("endTime")String timeEnd,@Param("companyName") String companyName,@Param("companyId") Long companyId);

    /**
     * @description: 分页查询合作商下所有卖家 销售额 记录明细
     * @author kyyang
     * @date 2021/7/1 22:10
     * @version 1.0
     */
    List<PartnerSupplierQueryPageRes> selectPartnerSupplierQueryPageList(@Param("startTime") String timeBegin,@Param("endTime")String timeEnd,@Param("companyName")String companyName,@Param("companyId") Long companyId,@Param("sortType") int sortType,@Param("start") int start,@Param("end") int end);

    List<DateValueVO> selectPartnerSupplierQueryOneReport(@Param("startTime") String timeBegin,@Param("endTime") String timeEnd,@Param("companyId") Long companyId);

    /**
     * @description: 查询合作商下属供货商 目录销售额分页 总记录数
     * @author kyyang
     * @date 2021/7/1 22:49
     * @version 1.0
     */
    Integer selectPartnerCategoryQueryPageCount(@Param("startTime") String timeBegin,@Param("endTime")String timeEnd,@Param("categoryName") String categoryName,@Param("companyId") Long companyId);

    /**
     * @description: 查询合作商下属供货商 目录销售额分页 记录明细
     * @author kyyang
     * @date 2021/7/1 22:53
     * @version 1.0
     */
    List<AdminCategoryQueryPageRes> selectPartnerCategoryQueryPageList(@Param("startTime") String timeBegin,@Param("endTime")String timeEnd,@Param("sortType") int sortType,@Param("categoryName") String categoryName,@Param("companyId") Long companyId,@Param("start") int start, @Param("end")int end);

    /**
     * @description: 查询时间范围内卖家销售情况
     * @author kyyang
     * @date 2021/8/10 23:11
     * @version 1.0
     */
    List<DateValueVO> selectPartnersSupplierCompanyListSales(@Param("startTime") String timeBegin,@Param("endTime") String timeEnd,@Param("companyId") Long companyId);

    List<SupplierQueryOneVO> selectPartnerSupplierQueryOne(@Param("startTime") String timeBegin, @Param("endTime")String timeEnd, @Param("companyId") Long companyId);
}
